import request from '@/utils/request'

const prefix = "/api/examination"


/**
 * @param {Object} status 1,2,0
 *  场次列表
 */
export function examData(status) {
	return request({
		url: prefix + '/list?status=' + status,
		method: 'get'
	})
}


/**
 * @param {Object} examinationId 场次ID
 * 题目列表
 */
export function questionData(examinationId) {
	return request({
		url: prefix + '/questionList/' + examinationId,
		method: 'get'
	})
}


/**
 * @param {Object} examinationId 场次ID
 * 我的考试
 */
export function mineExamination(examinationId) {
	return request({
		url: prefix + '/mineExamination/' + examinationId,
		method: 'get'
	})
}



// 提交考试
export function postExam(data) {
	return request({
		url: prefix + '/postExam',
		method: 'post',
		data: data
	})
}



// 添加考试
export function addExam(data) {
	return request({
		url: prefix + '/addExam',
		method: 'post',
		data: data
	})
}


